import 'package:flutter/material.dart';
import 'utils/UIData.dart';
import 'ui/page/HomePage.dart';
import 'utils/ThemeDataUtils.dart';
import 'dart:io';
import 'ui/page/SplashScreen.dart';
import 'ui/page/login_page.dart';

class MyApp extends StatefulWidget {

  @override
  State createState() {
    return new MyAppState();
  }
}

class MyAppState extends State<MyApp> {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: UIData.appName,
      debugShowCheckedModeBanner: false,
      theme:  new ThemeData(
          brightness: Brightness.light,
          backgroundColor: Colors.white,
          platform: Platform.isAndroid? TargetPlatform.android : TargetPlatform.iOS),
      home: SplashScreen(),

      routes: <String, WidgetBuilder>{
        UIData.homeRoute: (BuildContext context) => HomePage(),
        UIData.splashRoute: (BuildContext context) => SplashScreen(),
        UIData.loginRoute:(BuildContext context) => LoginPage(),
      },
    );
  }

  @override
  void dispose() {
    super.dispose();
  }
}